
/*
This file is part of MJIN2.

Copyright (C) 2012-2013 Opensource Game Studio

This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
arising from the use of this software.

Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not
   claim that you wrote the original software. If you use this software
   in a product, an acknowledgment in the product documentation would be
   appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
   misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/

#ifndef MJIN2_APPLICATION_H
#define MJIN2_APPLICATION_H

#include <mjin2/Common.h>

namespace mjin2
{
namespace priv
{
class Application;
}

class Logger;
class PathResolver;

//! Initializes logger, path resolver and a few OSG caching options.
class Application
{
        DISALLOW_COPY_AND_ASSIGN(Application);
    public:
        //! \param name Application name used in log.
        //! \param logFileName Log message are redirected to the specified file.
        Application(const String &name,
                    const String &logFileName) throw (Exception);
        ~Application() throw ();

        //! Return Logger instance used by Application.
        Logger *logger() throw ();
        //! Return PathResolver instance that should be used everywhere.
        PathResolver *pathResolver() throw ();

    private:
        priv::Application *mD;
};

} // namespace mjin2

#endif // MJIN2_APPLICATION_H

